<include file="Public/head" />
<style type="text/css">
    .focus-btn{width:80px;border-radius: 3px;color: #fff;margin-left: 7px;padding: 0;background-color: #20ab4f;border: medium none;}
    .carousel table tr td{height:40px;line-height:40px;text-align:left;}
    .carousel_sub{}
    .carousel_sub input{ background: #20ab4f; border: 1px solid #20ab4f;border-radius: 3px;color: #fff;cursor: pointer;
        font-size: 14px;height: 30px;line-height: 30px;margin: 30px 10px;text-align: center;width: 170px;}
    .genghua {background: #20ab4f;border: medium none;
        border-radius: 4px;color: #fff;cursor: pointer; display: inline-block;height: 30px;
        line-height: 30px;width: 100px; margin-left:-105px;}
    .shangChuan { cursor: pointer; height: 30px;opacity: 0; width: 100px;}
    .edit_page,.confirm_page{border:1px solid #ececec;}

    #sort-list ul li {float:left;margin-left:10px;}
    #sort-list ul li span{display:block;width:30px;height:30px;line-height:30px;border:1px solid #ececec;text-align:center;cursor:pointer;}
    .sortCuur {background-color:#20ab4f;color:#fff;border:1px solid #20ab4f;}
    .isHave{background-color:#ececec;}
    .tipt {
        width: 300px;
        height: 30px;
        line-height: 30px;
        border: 1px solid #ededee;
        padding-left: 5px;
    }
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="xtgl.setting" />
    <div class="mianR">
        <div class="edit_page">
            <h3 class="cha">编辑配置信息</h3>
            <div class='carousel'>
                <form id="editForm" action="/Setting/update" method="post">
                    <table width="100%">
                        <tr>
                            <td width="10%" style="text-align:center">标题</td>
                            <td width="80%" style="padding:5px 10px;">
                                <input class="tipt" type="text" name="title" id="title"  value="" placeholder="配置标题" > 配置的标题,例如 开发者模式
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center">配置名称</td>
                            <td style="padding:5px 10px;">
                                <input class="tipt" type="text" name="name" id="name" value="" placeholder="配置名称" > 大写英文 如:DEVELOP_MODE
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center">配置说明</td>
                            <td style="padding:5px 10px;">
                                <textarea name="remark" id="remark" cols="80" rows="5" placeholder="配置说明"></textarea> 对配置的说明 如 1:是;2:否;
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center">配置值</td>
                            <td style="padding:5px 10px;">
                                <textarea name="value" id="value" cols="80" rows="5" placeholder="配置值"></textarea> 配置的值
                            </td>
                        </tr>
                    </table>
                    <input type="hidden" name="id" value="{$detail.id}"/>
                </form>
                <div class='carousel_sub'>
                    <input id="submit_edit" type="button" value="确定">
                    <input type="button" value="取消" onclick="history.back()" name="">
                </div>
            </div>
            <div class="yunBei" style="z-index:999998"></div>
        </div>
    </div>
    <div class="clear"></div>
    <script type="text/javascript">
        $("#submit_edit").click(function () {
            $(".yunBei").css("display","block");
            $.post("/Setting/add_setting",$("#editForm").serialize(),function (data) {
                if(data.code!=200){
                    shibai_alert(data.msg,1000,function () {
                        $(".yunBei").css("display","none");
                    });

                }else{
                    btn_alert("更新成功",1500,function () {
                        window.location.href=document.referrer
                    });

                }
            },'json');
        });
    </script>
    <include file="Public/foot" >